home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / windows / fc_11f.zip / WWWFC1.MN$ < prev    next >
Text File  |  1992-07-16  |  16KB  |  353 lines

  1. ; Da AutoExec Section is on top here.  Actually runs before File Manager
  2. ; actually appears on the screen
  3.  
  4.         TAB=num2char(9)
  5.         CR=strcat(num2char(13),num2char(10))
  6.  
  7. Change File Commander menus   ;Edit - with notepad, the file extender macros
  8.  Edit Menu Scripts
  9.         t1=IniReadPvt("FileCmdr","MenuTitle1","FC1","WINFILE.INI")
  10.         t2=IniReadPvt("FileCmdr","MenuTitle2","FC2","WINFILE.INI")
  11.         t3=IniReadPvt("FileCmdr","MenuTitle3","FC3","WINFILE.INI")
  12.         t4=IniReadPvt("FileCmdr","MenuTitle4","FC4","WINFILE.INI")
  13.         f1=IniReadPvt("FileCmdr","MenuFile1","WWWFC1.MNU","WINFILE.INI")
  14.         f2=IniReadPvt("FileCmdr","MenuFile2","WWWFC2.MNU","WINFILE.INI")
  15.         f3=IniReadPvt("FileCmdr","MenuFile3","WWWFC3.MNU","WINFILE.INI")
  16.         f4=IniReadPvt("FileCmdr","MenuFile4","WWWFC4.MNU","WINFILE.INI")
  17.         a=strcat(f1,TAB,t1,"~",f2,TAB,t2,"~",f3,TAB,t3,"~",f4,TAB,t4)
  18.         drop(t1,t2,t3,t4,f1,f2,f3,f4)
  19.         a=TextSelect("Choose Menu to Edit",a,"~")
  20.         if a=="" then exit
  21.         b=ItemExtract(1,a,TAB)
  22.         a=FileLocate(b)
  23.         adir=FilePath(a)
  24.         DirChange(adir)
  25.         broot=FileRoot(b)
  26.         bname=strcat(broot,".BAK")
  27.         FileCopy(b,bname,@FALSE)
  28.         run("notepad.exe",b)
  29.  
  30.  Change Toplevel Menu Titles
  31.         t1=IniReadPvt("FileCmdr","MenuTitle1","FC1","WINFILE.INI")
  32.         t2=IniReadPvt("FileCmdr","MenuTitle2","FC2","WINFILE.INI")
  33.         t3=IniReadPvt("FileCmdr","MenuTitle3","FC3","WINFILE.INI")
  34.         t4=IniReadPvt("FileCmdr","MenuTitle4","FC4","WINFILE.INI")
  35.         a=strcat(t1,TAB,t2,TAB,t3,TAB,t4)
  36.         b=TextSelect("Choose Title to Change",a,TAB)
  37.         if b=="" then exit
  38.         c=ItemLocate(b,a,TAB)
  39.         d=AskLine("Menu Title Change","Old title is -> %b%%CR%Enter new title.  Use && to show hotkey.%CR%(e.g.  FC&&1 gives FC&1",b)
  40.         if d=="" then exit
  41.         IniWritePvt("FileCmdr","MenuTitle%c%",d,"WINFILE.INI")
  42.         Reload()                         ; Reload FM Extensions
  43.  
  44.         
  45.  _Load &WIL Help File
  46.         a=IniReadPvt("WWWSetup","FileCommander","","WWW-PROD.INI") ; Get installed directory
  47.         if a!="" then a="%a%\HELP\"                 ; add HELP dir suffix
  48.         WinHelp("%a%WIL.HLP","CONTENTS","")
  49.  
  50. _Bro&wse...  ;Browse hilited file
  51.         l=strcat(CurrentPath(),CurrentFile())
  52.         run("browser.exe",l)
  53.         drop(a,l)
  54.  
  55. &Edit...      ;Edit hilited file
  56.         l=CurrentFile()
  57.         if l=="" || l==" " then goto NULL
  58.         a=strscan(l,".\",0,@BACKSCAN)
  59.         if a==0 then l=strcat(l,".")
  60.         if a==0 then goto NULL
  61.         if strsub(l,a,1)!="." then l=strcat(l,".")
  62.      :NULL
  63.         run("notepad.exe",strtrim(l))
  64.         drop(a,b,l)
  65.  
  66.  
  67. File System
  68.  &Size of ENTIRE file/dir structure
  69.         tot = FileSize(FileItemize(""))
  70.         sub1 = DirItemize("")
  71.         if (tot==0 && sub1=="") then tot=FileSize(FileItemize("*.*"))
  72.                                 then sub1=DirItemize("*.*")
  73.         totdir=0
  74.         level=1
  75.         dir1=DirGet()
  76.         numdir1 = ItemCount(sub1, " ")
  77.         index1 = 0
  78.   
  79.         :loop
  80.         If index%level% == numdir%level% Then Goto upalevel
  81.         index%level% = index%level% + 1
  82.         DirChange(StrCat(dir%level%, ItemExtract(index%level%, sub%level%, " ")))
  83.         totdir=totdir+1
  84.         tot = tot + FileSize(FileItemize("*.*"))
  85.         level = level + 1
  86.         dir%level% = DirGet()
  87.         sub%level% = DirItemize("*.*")
  88.         numdir%level% = ItemCount(sub%level%, " ")
  89.         index%level% = 0
  90.         goto loop
  91.   
  92.         :upalevel
  93.         drop(dir%level%,sub%level%,index%level%,numdir%level%)
  94.         level=level-1
  95.         if level!=0 then goto loop
  96.  
  97.         :done
  98.         ; -----------
  99.         ; Termination
  100.         ; -----------
  101.         If StrLen(tot) < 9 Then tot = StrCat(StrFill("", 9 - StrLen(tot)), tot)
  102.         tot = StrCat(StrSub(tot,1,3),",",StrSub(tot,4,3),",",StrSub(tot,7,3))
  103.         tot = StrTrim(tot)
  104.         If StrSub(tot, 1, 1) == "," Then tot = StrSub(tot, 2, StrLen(tot) - 1)
  105.         tot = StrTrim(tot)
  106.         If StrSub(tot, 1, 1) == "," Then tot = StrSub(tot, 2, StrLen(tot) - 1)
  107.         tot = StrTrim(tot)
  108.         Message("%totdir% Subdirectories included", "Total size %tot% bytes.")
  109.         drop(tot,level,totdir)
  110.  
  111.  File &Info    ; Display information on hilited files
  112.         a=FileItemize("")
  113.         if a=="" then a=FileItemize("*.*")
  114.         tot=FileSize(a)
  115.         c=ItemCount(a," ")
  116.         n=0
  117.         b=""
  118.         :loop
  119.         if n==c then goto show
  120.         n=n+1
  121.         a1=StrFix(ItemExtract(n,a," ")," ",14)
  122.         a2=FileSize(a1)
  123.         a3=FileTimeGet(a1)
  124.         a4=FileAttrGet(a1)
  125.         b=strcat(b,a1,tab,a2,tab,a3,tab,a4,"|")
  126.         goto loop
  127.         :show
  128.         ItemSelect("Total Size=%tot%",b,"|")
  129.         :cancel
  130.         drop(a,tot,c,n,a1,a2,a3,a4,b)
  131.  
  132.  &Freespace on Local Drives
  133.         Drives=DiskScan(2)     ; 2 is the code for local hard drives
  134.         Dmax=strlen(Drives)
  135.         DIndex=1
  136.         TotalSize=0
  137.         DriveReport=""
  138.  
  139.         :COUNTSPACE
  140.         NextDrive=StrSub(Drives,Dindex,1)
  141.         a=DiskFree(NextDrive)/1024
  142.         TotalSize=a+TotalSize
  143.         DriveReport=strcat(DriveReport,NextDrive," = ",TAB,a,"K",TAB,strfill("|",(a+500)/1000),"@")
  144.         DIndex=Dindex+3  ;each entry is 3 bytes long
  145.         if DIndex<=Dmax then goto COUNTSPACE
  146.         ItemSelect("Total Space Available = %TotalSize%K",DriveReport,"@")
  147.         Drop(TotalSize,DriveReport,Drives,NextDrive)
  148.  
  149.  Floppy Space and selected files
  150.   A:
  151.         message(strcat("Drive A ",DiskFree("A")),strcat("Selected Files ",FileSize(FileItemize(""))))
  152.   B:
  153.         message(strcat("Drive B ",DiskFree("B")),strcat("Selected Files ",FileSize(FileItemize(""))))
  154.  
  155.  
  156. Clipboard Tricks
  157.  Path and Filename to Clipboard
  158.         Clipput(strcat(DirGet(),CurrentFile()))
  159.  Copy &Directory to Clipboard
  160.         a=FileItemize("*.*")
  161.         a=ItemSort(a," ")
  162.         a=StrReplace(a," ",cr)
  163.         ClipPut(a)
  164.         Drop(a)
  165.  Copy &Hilited files to Clipboard
  166.         a=FileItemize("")
  167.         a=ItemSort(a," ")
  168.         a=StrReplace(a," ",cr)
  169.         ClipPut(a)
  170.         Drop(a)
  171.  Copy &Hilited dirs to Clipboard
  172.         a=DirItemize("")
  173.         a=ItemSort(a," ")
  174.         a=StrReplace(a," ",cr)
  175.         ClipPut(a)
  176.         Drop(a)
  177.  Run Character Mapper
  178.         Run("charmap.exe","")
  179.  Copy &Special Characters to Clipboard
  180.        a=" í| ó| ú| ñ| Ñ| ª| º| ¿| ⌐| ¬|"       ;161 thru 170
  181.        b=" ½| ¼| ¡| «| »| ░| ▒| ▓| │| ┤|"       ;171 thru 180
  182.        c=" ╡| ╢| ╖| ╕| ╣| ║| ╗| ╝| ╜| ╛|"       ;181 thru 190
  183.        d=" ┐| └| ┴| ┬| ├| ─| ┼| ╞| ╟| ╚|"       ;191 thru 200
  184.        e=" ╔| ╩| ╦| ╠| ═| ╬| ╧| ╨| ╤| ╥|"       ;201 thru 210
  185.        f=" ╙| ╘| ╒| ╓| ╫| ╪| ┘| ┌| █| ▄|"       ;211 thru 220
  186.        g=" ▌| ▐| ▀| α| ß| Γ| π| Σ| σ| µ|"       ;221 thru 230
  187.        h=" τ| Φ| Θ| Ω| δ| ∞| φ| ε| ∩| ≡|"       ;231 thru 240
  188.        i=" ±| ≥| ≤| ⌠| ⌡| ÷| ≈| °| ∙| ·|"       ;241 thru 250
  189.        j=" √| ⁿ| ²| ■|  "                       ;251 thru 255
  190.        a=strcat(a,b,c,d,e,f,g,h,i,j)
  191.        Drop(b,c,d,e,f,g,h,i,j)
  192.        a=ItemSelect("Choose a character",a,"|")
  193.        a=strsub(a,2,1)
  194.        ClipPut(a)
  195.        Drop(a)
  196.  _Start Clipboard
  197.        run("clipbrd.exe","")
  198.  
  199. |Applications
  200.  Ami Pro (Lotus)
  201.         a=FileLocate("amipro.exe")                      ; Try brute force path search
  202.         if a=="" then a=IniRead("extensions","sam","")  ; No? Try via [extensions] section
  203.         terminate(a=="","Error","AmiPro not found")     ; Not installed normally
  204.         b=strindex(a," ",0,@FWDSCAN)                    ; Find first space
  205.         if b==0 then b=strlen(a)+1                      ; None? ...adjust b
  206.         b=strsub(a,1,b-1)                               ; Pick off ^.sam stuff
  207.         run(b,"")                                       ; Run AmiPro
  208.  
  209.  Corel Draw! (Corel)
  210.         a=IniRead("CorelDraw","Dir","")                 ; Try via INI file info
  211.         terminate(a=="","Error","Corel Draw not found") ; Not installed normally
  212.         a=strcat(a,"\coreldrw.exe")
  213.         run(a,"")                                       ;Corel Drw
  214.  
  215.  DynaComm (FutureSoft)
  216.         a=FileLocate("dynacomm.exe")                    ; Try brute force path search
  217.         if a=="" then a=IniRead("extensions","dcm","")  ; No? Try via [extensions] section
  218.         terminate(a=="","Error","Dynacomm not found")   ; Not installed normally
  219.         b=strindex(a," ",0,@FWDSCAN)                    ; Find first space
  220.         if b==0 then b=strlen(a)+1                      ; None? ...adjust b
  221.         b=strsub(a,1,b-1)                               ; Pick off ^.dcm stuff 
  222.         run(b,"")                                       ; Run Dynacomm
  223.  
  224.  Designer/Draw (Micrografx)
  225.         a=IniRead("extensions","drw","")                ; Try via [extensions] section
  226.         terminate(a=="","Error","Drawing tool not found") ; Not installed normally
  227.         b=strindex(a," ",0,@FWDSCAN)                    ; Find first space
  228.         if b==0 then b=strlen(a)+1                      ; None? ...adjust b
  229.         b=strsub(a,1,b-1)                               ; Pick off ^.drw stuff 
  230.         run(b,"")                                       ; Run DRW tool
  231.  
  232.  Excel (Microsoft)
  233.         a=FileLocate("excel.exe")                       ; Try brute force path search
  234.         if a=="" then a=IniRead("extensions","xls","")  ; No? Try via [extensions] section
  235.         terminate(a=="","Error","Excel not found")      ; Not installed normally
  236.         b=strindex(a," ",0,@FWDSCAN)                    ; Find first space
  237.         if b==0 then b=strlen(a)+1                      ; None? ...adjust b
  238.         b=strsub(a,1,b-1)                               ; Pick off ^.xls stuff 
  239.         run(b,"")                                       ; Run Excel
  240.  
  241.  PowerPoint (Microsoft)
  242.         a=FileLocate("powerpnt.exe")                    ; Try brute force path search
  243.         if a=="" then a=IniRead("extensions","ppt","")  ; No? Try via [extensions] section
  244.         terminate(a=="","Error","PowerPoint not found") ; Not installed normally
  245.         b=strindex(a," ",0,@FWDSCAN)                    ; Find first space
  246.         if b==0 then b=strlen(a)+1                      ; None? ...adjust b
  247.         b=strsub(a,1,b-1)                               ; Pick off ^.ppt stuff 
  248.         run(b,"")                                       ; Run PowerPoint
  249.  
  250.  Project (Microsoft)
  251.         a=FileLocate("winproj.exe")                     ; Try brute force path search
  252.         if a=="" then a=IniRead("extensions","mpp","")  ; No? Try via [extensions] section
  253.         terminate(a=="","Error","Project not found") ; Not installed normally
  254.         b=strindex(a," ",0,@FWDSCAN)                    ; Find first space
  255.         if b==0 then b=strlen(a)+1                      ; None? ...adjust b
  256.         b=strsub(a,1,b-1)                               ; Pick off ^.mpp stuff 
  257.         run(b,"")                                       ; Run PowerPoint
  258.  
  259.  Publisher (Microsoft)
  260.         a=FileLocate("mspub.exe")                       ; Try brute force path search
  261.         if a=="" then a=IniRead("extensions","pub","")  ; No? Try via [extensions] section
  262.         terminate(a=="","Error","Publisher not found") ; Not installed normally
  263.         b=strindex(a," ",0,@FWDSCAN)                    ; Find first space
  264.         if b==0 then b=strlen(a)+1                      ; None? ...adjust b
  265.         b=strsub(a,1,b-1)                               ; Pick off ^.pub stuff 
  266.         run(b,"")                                       ; Run Visual Basic
  267.  
  268.  Word For Windows (Microsoft)
  269.         a=FileLocate("winword.exe")                     ; Try brute force path search
  270.         if a=="" then a=IniRead("extensions","dot","")  ; No? Try via [extensions] section
  271.         terminate(a=="","Error","WinWord not found")    ; Not installed normally
  272.         b=strindex(a," ",0,@FWDSCAN)                    ; Find first space
  273.         if b==0 then b=strlen(a)+1                      ; None? ...adjust b
  274.         b=strsub(a,1,b-1)                               ; Pick off ^.dot stuff 
  275.         run(b,"")                                       ; Run WinWord
  276.  
  277.  Visual Basic (Microsoft)
  278.         a=FileLocate("vb.exe")                          ; Try brute force path search
  279.         if a=="" then a=IniRead("extensions","frm","")  ; No? Try via [extensions] section
  280.         terminate(a=="","Error","Visual Basic not found"); Not installed normally
  281.         b=strindex(a," ",0,@FWDSCAN)                    ; Find first space
  282.         if b==0 then b=strlen(a)+1                      ; None? ...adjust b
  283.         b=strsub(a,1,b-1)                               ; Pick off ^.frm stuff 
  284.         run(b,"")                                       ; Run Visual Basic
  285.  
  286. _Control &Panel
  287.         run("control.exe","")
  288.  
  289. &System Information
  290.        wintype="retail"
  291.        if WinMetrics(22) then wintype="debug"
  292.  
  293.         wc=WinConfig()
  294.         if !(wc&1) then mode="Real"
  295.         if wc&16 then mode="Standard"
  296.         if wc&32 then mode="Enhanced"
  297.  
  298.         if wc&2 then cpu=286
  299.         if wc&4 then cpu=386
  300.         if wc&8 then cpu=486
  301.         if wc&64 then cpu=8086
  302.         if wc&128 then cpu=80186
  303.  
  304.         Sysinfo=strcat(cpu,' ',mode,' ',wintype,' Windows ',WinVersion(1),'.',WinVersion(0),CR)
  305.  
  306.         math="No math"
  307.         if wc&1024 then math="Math"
  308.         mouse="No Mouse"
  309.         if WinMetrics(19) then mouse="Mouse"
  310.  
  311.         Sysinfo=strcat(sysinfo,math," co-processor.   ",mouse,' available.',CR)
  312.  
  313.         sysinfo=strcat(sysinfo,WinMetrics(0),'x',WinMetrics(1)," video resolution.  ",WinMetrics(-1),"  colors.",CR)
  314.  
  315.         ErrorMode(@OFF)
  316.         LastError()
  317.         PlayMedia("Status WaveForm Ready")
  318.         ErrorMode(@CANCEL)
  319.         if LastError()!=1193 then sysinfo=strcat(sysinfo,"Windows multimedia extensions present.",CR)
  320.  
  321.         bug=NetGetCaps(2)
  322.         if bug==0 then math="No n"
  323.         if bug!=0 then math="N"
  324.         if bug==256 then math="Microsoft n"
  325.         if bug==512 then math="Lan Manager n"
  326.         if bug==768 then math="Novell NetWare n"
  327.         if bug==1024 then math="Banyan Vines n"
  328.         if bug==1280 then math="10 Net n"
  329.         sysinfo=strcat(sysinfo,math,"etwork installed.",CR)
  330.  
  331.         bug=WinResources(0)/1024   ; Compute memory avail
  332.         math=strlen(bug)
  333.         if math>3 then bug=strcat(strsub(bug,1,math-3),',',strsub(bug,math-2,3))
  334.  
  335.         sysinfo=strcat(sysinfo,CR,bug," KB Free Memory",CR)
  336.         sysinfo=strcat(sysinfo,WinResources(2),"%% System Resources Free (",WinResources(3),"%% GDI, ",WinResources(4),"%% User)",CR)
  337.  
  338.         sysinfo=strcat(sysinfo,"DOS ",DosVersion(1),'.',DosVersion(0),"  using ",environment("COMSPEC"),CR)
  339.         disks=DiskScan(1)
  340.         if disks!="" then sysinfo=strcat(sysinfo,"Floppies ",disks,CR)
  341.         disks=DiskScan(2)
  342.         if disks!="" then sysinfo=strcat(sysinfo,"Hard Disks ",disks,CR)
  343.         disks=DiskScan(4)
  344.         if disks!="" then sysinfo=strcat(sysinfo,"Network Disks ",disks,CR)
  345.         sysinfo=strcat(sysinfo,"Windows Directory ",DirWindows(0),CR)
  346.         sysinfo=strcat(sysinfo,"System  Directory ",DirWindows(1),CR)
  347.         sysinfo=strcat(sysinfo,CR,"WIL Interpreter Ver ",VersionDll())
  348.  
  349.         ver=Version()
  350.         Message("File Commander %ver% SysInfo",Sysinfo)
  351.  
  352.     
  353.